home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Kant Generator Pro 1.2 / src / kode ƒ / kant build dispatch.c < prev    next >
C/C++ Source or Header  |  1995-02-10  |  1KB  |  64 lines

  1. #include "kant build dispatch.h"
  2. #include "kant build dialogs.h"
  3. #include "kant build files.h"
  4. #include "kant build lists.h"
  5. #include "kant build window.h"
  6. #include "text twiddling.h"
  7. #include "graphics.h"
  8. #include "menus.h"
  9. #include "window layer.h"
  10. #include "generic window handlers.h"
  11. #include "program globals.h"
  12.  
  13. void DoNewDispatch(WindowPtr theWindow, Boolean isRef)
  14. {
  15.     if (isRef)
  16.         DoNewRef(theWindow);
  17.     else
  18.         DoNewInstantiation(theWindow);
  19. }
  20.  
  21. void DoEditDispatch(WindowPtr theWindow)
  22. {
  23.     if (ReferenceListActiveQQ())
  24.         DoEditRef(theWindow);
  25.     else
  26.         DoEditInstantiation(theWindow);
  27. }
  28.  
  29. void DoDeleteDispatch(WindowPtr theWindow)
  30. {
  31.     if (ReferenceListActiveQQ())
  32.         DoDeleteRef(theWindow);
  33.     else
  34.         DoDeleteInstantiation(theWindow);
  35. }
  36.  
  37. void DoMarkInterestingDispatch(WindowPtr theWindow)
  38. {
  39.     Boolean            oldState;
  40.     Str255            referenceName;
  41.     
  42.     GetHighlightedReferenceName(referenceName);
  43.     oldState=HighlightedReferenceInterestingQQ();
  44.     SetInterestingBit(GetWindowFS(theWindow), referenceName, !oldState);
  45.     RebuildInsertMenu();
  46.     SetHighlightedReferenceInteresting(!oldState);
  47. }
  48.  
  49. void DoShowMessageDispatch(WindowPtr theWindow)
  50. {
  51.     gShowMessageBox=!gShowMessageBox;
  52.     EraseRect(&(theWindow->portRect));
  53.     ResizeTheBuildWindow(theWindow);
  54.     InvalRect(&(theWindow->portRect));
  55. }
  56.  
  57. void DoShowToolbarDispatch(WindowPtr theWindow)
  58. {
  59.     gShowToolbar=!gShowToolbar;
  60.     EraseRect(&(theWindow->portRect));
  61.     ResizeTheBuildWindow(theWindow);
  62.     InvalRect(&(theWindow->portRect));
  63. }
  64.